package com.thf.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.thf.model.NewsModels;
import com.thf.model.ResultData;
import com.thf.service.NewsService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class NewsInfoController {
    @Resource
    private NewsService newsService;
    @RequestMapping("/news/info")
    public ResultData<List<NewsModels>> findNewsInfoPage(Integer id){
        List<NewsModels> list = newsService.findNewsInfoPage(id);
        return new ResultData<>(0, list);
    }
}
